package com.xy.consumer.server;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

// 添加 Feign 注解，指定调用的服务
@FeignClient(value = "API-PROVIDER",fallbackFactory = DeptClientFallbackFactoryImpl.class)
public interface DeptClientService {

    @GetMapping("/provider/dept/get/{id}")
    String getDept(@PathVariable(value = "id") Integer id);

    @GetMapping("/provider/dept/list")
    List<String> getDeptList();
}